import pandas as pd


# 读取数据并赋值对象
df = pd.read_excel("emp.xlsx")
'''
# 定义筛选策略
condation = df["年龄"] >= 30
# 将筛选之后的数据打印
data = df.loc[condation, ["姓名","年龄"]]

# 写入数据
with pd.ExcelWriter("person.xlsx") as write:
    data.to_excel(write)
'''

# 统计每个城市的员工数量
'''
data = df["城市"].value_counts()
print(data)
'''

condation = (df["年龄"] >= 30) & (df["工资"] > 15000)
print(df[condation])